<?php
// main function
$body_html = represent_form();

include("../template/layout.php");

// view
function represent_form()
{
	$form_html =
"<script charset='utf-8' src='../editor/kindeditor.js'></script>
<script>
	KE.show({
		id : 'details',
		cssPath : './index.css',
		imageUploadJson : '../../php/upload_json.php',
		fileManagerJson : '../../php/file_manager_json.php',
		allowFileManager : true,
		afterCreate : function(id) {
			KE.event.ctrl(document, 13, function() {
				KE.sync(id);
				document.forms['example'].submit();
			});
			KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
				KE.sync(id);
				document.forms['example'].submit();
			});
		}
	});
</script>
<form action='./publish_post.php' method='post' enctype='multipart/form-data'>
名称：<input type='text' name='name'/><br />
详细内容：<br />
<textarea id='details' name='details' style='width:700px;height:300px;visibility:hidden;'>
</textarea>
<input type='submit' value='发布' />
</form>";
	return $form_html;
}
?>
